import { MockMethod } from 'vite-plugin-mock'

const carouselList = [{
  "status": "1",
  "createBy": "123",
  "createTime": 1602507103000,
  "updateBy": "123",
  "updateTime": 1609942786000,
  "deleteStatus": "1",
  "id": "160250710322251",
  "title": "测试",
  "url": "www.sunxueqi.com",
  "description": "点击没什么反应",
  "clickCount": 350,
  "imgUrl": "https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg",
  "target": "1"
}, {
  "status": "1",
  "createBy": "123",
  "createTime": 1602000570000,
  "updateBy": "123",
  "updateTime": 1609942782000,
  "deleteStatus": "1",
  "id": "160200057010385",
  "title": "测试标题",
  "url": "www.baidu.com",
  "description": "轮播图的相关描述",
  "clickCount": 520,
  "imgUrl": "https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg",
  "target": "1"
}]

export default [
  {
    url: '/mock/system/carousel/list',
    method: 'get',
    response: ({ query }) => {
      return {
        code: 200,
        data: carouselList,
        total: 2,
        message: ''
      }
      // return {
      //   code: 5001,
      //   message: '用户不存在'
      // }
    }
  }
] as MockMethod[]